<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <!-- 宣传委员 -->
   	<title>学生历程</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<link rel="stylesheet" type="text/css" href="css/f/navs.css">
	<link rel="stylesheet" type="text/css" href="css/f/default.css">
	<link rel="stylesheet" type="text/css" href="css/f/assignment.css"/><head>
	<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
	<script src="js/f/default.js"></script>
</head>
</head>

<body>
	<div class="all">
		<jsp:include page="/nav.jsp"></jsp:include>
		<form action="cadre/appendSchoolLife.do" method="post">
	      	  <div class="rightall float-left">
	        	 	<div class="already">
		                <div class="already-title">
		        			<div class="left">添加学生经历</div>
		        		</div>
		       			<div class="float-left" style="height:50px;width: 20%;margin-top:15px;margin-left:10%;">
		       				学号:&nbsp;&nbsp;<input type="text" name="stuId" id="stu_name" class="query"  style="width: 75%;"/>
		       			</div>
		       			<div class="float-left" style="height:50px;width: 25%;margin-top: 15px;margin-left:10%;">
		       				活动标题:&nbsp;&nbsp;<input type="text" name="activityTitle" id="stu_name" class="query"  style="width: 65%;"/>
		       			</div>
		       			<div style="height:50px;margin-right:10%;">
		       				<div class="float-right"><input type="button" id="insert_img_btn" class="upload float-left btn-style" value="添加更多图片" style="width: 100px;margin-top: 15px;"></div>
		       			</div>
		       			<div style="height:30px;width:80%;margin-top:20px;margin-left:10%;" id="fileup1_div">
			       			<input type="text" name="file1" id="fileup1" class="fileup query float-left" style="width: 70%;"/>
			                <label class="upload float-left btn-style">选择文件
			                	<input type="file" class="xfile" accept=".png,.jpg,.gif,.jpeg" name="xfile1" onchange="document.getElementById('fileup1').value=this.value"/>
			                </label>
		                </div>
	                </div>
		            <div class="float-clear"></div>
		       			<h3 id="about_content">相关简介:</h3>
		                	<textarea rows="5" cols="50" name="schoolLifeContent" class="content"></textarea><br>
		                <button type="submit" class="submit btn-style" style="width: 100%;">提交</button>
	       			</div>
       			</form>
       		</div>		
       		<script type="text/javascript">
       			$(function(){
       				var div_content_count = 1;
 					$("#insert_img_btn").click(function(){
 						div_content_count=div_content_count+1;
 						var div_content="<div style='height:30px;width:80%;margin-top:20px;margin-left:10%;' id='fileup"+div_content_count+"_div'><input type='text' name='file"+div_content_count+"' id='fileup"+div_content_count+"' class='fileup query float-left' style='width: 70%;'/><label class='upload float-left btn-style'>选择文件<input type='file' class='xfile' name='xfile"+div_content_count+"' onchange=\"document.getElementById(\'fileup"+div_content_count+"\').value=this.value\"/> </label></div>"; 
 						if(div_content_count<9)$("#fileup"+(div_content_count-1)+"_div").after(div_content);
					});
				});
       		</script>
  </body>
</html>
